package com.azier.kapacitor.script.node.nodebind;

import com.azier.kapacitor.script.node.EvalNode;
import com.azier.kapacitor.script.node.Node;

/**
* 1 * @Author: luoj
* 2 * @Date: 2019/11/8 11:27
* 3
*/

/**
Create an eval node that will evaluate the given transformation function to each data point. A list of expressions may be provided and will be evaluated in the order they are given. The results are available to later expressions.
**/

/**
创建一个评估节点，该评估节点将评估每个数据点的给定转换函数。可以提供表达式列表，并将按给出的顺序对其进行评估。结果可用于以后的表达式。
**/
public interface EvalNodeBind extends Node {

    /**
    Create an eval node that will evaluate the given transformation function to each data point. A list of expressions may be provided and will be evaluated in the order they are given. The results are available to later expressions.
    **/
    /**
    创建一个评估节点，该评估节点将评估每个数据点的给定转换函数。可以提供表达式列表，并将按给出的顺序对其进行评估。结果可用于以后的表达式。
    **/
    default EvalNode eval(String ...expressions){
        EvalNode nextNode = new EvalNode(expressions);
        this.setNextNode(nextNode);
        nextNode.zetHeadNode(this.getHeadNode());
        return nextNode;
    }
}